<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBannerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('banner', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name',20)->comment('图片名称');
            $table->string('path')->comment('图片地址');
            $table->string('url')->comment('跳转地址');
            $table->tinyInteger('status')->default(1)->comment('是否启用  0 禁用 1 启用');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `banner` comment '广告表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('banner');
    }
}
